-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coupons #506
base: original
Are you sure you want to change the base?
Coupons #506
Conversation
@pkolios You might want to add some documentation for this one maybe ? |
44a2d34
to
3977ebb
Compare
Codecov Report
@@ Coverage Diff @@
## master #506 +/- ##
=========================================
+ Coverage 99.39% 99.4% +<.01%
=========================================
Files 34 34
Lines 1817 1841 +24
Branches 166 166
=========================================
+ Hits 1806 1830 +24
Misses 5 5
Partials 6 6
Continue to review full report at Codecov.
|
Could include/use the new base class from #513, too. |
@@ -76,6 +77,10 @@ def test_plan_display_invoiceitem(self): | |||
i = InvoiceItem(plan=p) | |||
self.assertEquals(i.plan_display(), "My Plan") | |||
|
|||
def test_coupon_repr(self): | |||
c = Coupon(id=1, percent_off=25, duration="repeating", duration_in_months=3,) | |||
self.assertEquals(repr(c), "Coupon(pk=1, valid=False, amount_off=None, percent_off=25, currency='usd', duration='repeating', livemode=False, max_redemptions=None, times_redeemed=None, stripe_id='')") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncommon to set id/pk manually, but ok.
This needs to be really synced/updated from our next branch by now. |
Should wait for #513 to be merged likely. |
What's this PR do?
Add support for Coupons and Discounts objects
Definition of Done (check if considered and/or addressed):